<template>
  <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" class="namtc-leftmenu-tree"
           :default-expanded-keys="[1]"  node-key="id" accordion
  ></el-tree>
</template>
<script>
  export default {
    data() {
      return {
        data: [{
          id: 1,
          label: '学员',
          children: [{
            label: '总人数',
            url: 'dashboard/traineeCount'
          },{
            label: '地区',
            url: 'dashboard/traineeLocation'
          },{
            label: '年龄',
            url: 'dashboard/traineeAge'
          },{
            label: '职务',
            url: 'dashboard/traineeZhiwu'
          },{
            label: '同职务海龄',
            url: 'dashboard/traineeAgework'
          },{
            label: '学历',
            url: 'dashboard/traineeEducation'
          },{
            label: '船型',
            url: 'dashboard/traineeCrewtype'
          },{
            label: '个人',
            url: 'dashboard/traineeSelf'
          },{
            label: '课程',
            url: 'dashboard/traineeCourse'
          },{
            label: '学员反馈',
            url: 'dashboard/traineeFeedback'
          }]
        }, {
          label: '客户',
          children: [{
            label: '按课程收入排名',
            url: 'dashboard/customerPay'
          },{
            label: '按培训人次排名',
            url: 'dashboard/customerTraining'
          },{
            label: '推荐学员增长趋势',
            url: 'dashboard/customerTrainee'
          },{
            label: '新客户收入占比',
            url: 'dashboard/customerNew'
          },{
            label: '船东',
            url: 'dashboard/customerChuandong'
          },{
            label: '外派机构',
            url: 'dashboard/customerDaili'
          },{
            label: '地区',
            url: 'dashboard/customerLocation'
          },{
            label: '船型',
            url: 'dashboard/customerCrewtype'
          },{
            label: '课程',
            url: 'dashboard/customerCourse'
          },{
            label: '客户反馈',
            url: 'dashboard/customerFeedback'
          },{
            label: '客户拜访记录',
            url: 'dashboard/customerBaifang'
          },{
            label: '活动次数',
            url: 'dashboard/customerActivity'
          }]
        }, {
          label: '课程',
          children: [{
            label: '单课程成本',
            url: 'dashboard/courseCost'
          },{
            label: '单课程收入',
            url: 'dashboard/courseIncome'
          },{
            label: '新课程投资回报率',
            url: 'dashboard/courseReturn'
          },{
            label: '证书数量统计',
            url: 'dashboard/courseCertificate'
          },{
            label: '模拟器使用分析',
            url: 'dashboard/courseSimulator'
          },{
            label: '五大类课程收入占比',
            url: 'dashboard/courseTypeIncome'
          }]
        },{
          label: '设施设备',
          children: [{
            label: '教室空置成本',
            url: 'dashboard/classroomVacancy'
          },{
            label: '教室出租收入',
            url: 'dashboard/classroomIncome'
          },{
            label: '模拟器空置成本',
            url: 'dashboard/simulatorVacancy'
          }]
        },{
          label: '培训师',
          children: [{
            label: '培训师空置成本',
            url: 'dashboard/trainerVacancy'
          },{
            label: '课时数统计',
            url: 'dashboard/trainerHour'
          },{
            label: '可上课程数',
            url: 'dashboard/trainerCourseNum'
          },{
            label: '参加培训记录',
            url: 'dashboard/trainerTraining'
          }]
        },{
          label: '运营',
          children: [{
            label: '供方',
            url: 'dashboard/supplier'
          }]
        }],
        defaultProps: {
          children: 'children',
          label: 'label'
        }
      };
    },
    methods: {
      handleNodeClick(data) {
        if(data.url){
          router.push('/' + data.url);
          Lockr.rm("filData");
        }
      }
    }
  };
</script>
<style scoped>


</style>
